﻿namespace OT.HikiSecureCenterApis
{
    public class SecureCenterOption
    {
        /// <summary>
        /// 合作方APPKey
        /// </summary>
        public string AppKey { get; set; }
        /// <summary>
        /// 合作方APPSecret
        /// </summary>
        public string Secret { get; set; }
        /// <summary>
        /// 平台IP
        /// </summary>
        public string IP { get; set; }
        /// <summary>
        /// 平台端口，默认HTTPS的443端口
        /// </summary>
        public int Port { get; set; }
        /// <summary>
        /// 平台版本
        /// </summary>
        public double Ver { get; set; }
        /// <summary>
        /// 是否启用HTTPS协议，默认HTTPS
        /// </summary>
        public bool IsSSL { get; set; }
        /// <summary>
        /// url
        /// </summary>
        public string Url
        {
            get
            {
                string url = $"://{IP}:{Port}";
                if (IsSSL) { return $"https{url}"; };
                return $"http{url}";
            }
        }
    }
}
